<%@ page import="com.dingpeikeji.quickdeer.modules.rentproduct.entity.TDemands" contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<c:set var="REACTSTATUS_WAIT" value="<%=TDemands.REACTSTATUS_WAIT %>" />
<c:set var="REACTSTATUS_DONE" value="<%=TDemands.REACTSTATUS_DONE %>" />
<c:set var="REACTSTATUS_SURE" value="<%=TDemands.REACTSTATUS_SURE %>" />
<html>
<head>
<title>关于发票</title>
<link href="${ctxStatic }/xiake/css/style.css" rel='stylesheet'type='text/css' />
<jsp:include page="/WEB-INF/views/layouts/head.jsp"></jsp:include>
<script src="${ctxStatic }/xiake/js/slider.js"></script>
<script src="${ctxStatic }/xiake/js/jquery.reveal.js"></script>
<script src="${ctxStatic }/xiake/js/switch.js"></script>
<script>
	//计算开票金额
	function JSfpmoney()
	{
		var allmoney=0;
		/* var a=0;//超时长
		var b=0;//超公里
		var c=0;//司机食宿
		var d=0;//三者相加 */
		$(".fp_list table tr td").find("input").each(function(){
			var ck=$(this).attr("checked");
			if(ck=="checked")
			{
				$("#outtimefee").val(0);
				$("#outkmsfee").val(0);
				$("#dirverfee").val(0);
				 var a=$(this).parent().parent().find(".fp").find(".xs1").val();
				 var b=$(this).parent().parent().find(".fp").find(".xs2").val();
				 var c=$(this).parent().parent().find(".fp").find(".xs3").val();
				 if(isNaN(a)||a==''){
					a= 0; 
				 }
				 if(isNaN(b)||b==''){
					b= 0;
				 }
				 if(isNaN(c)||c==''){
					c= 0; 
				 }
				 var d = parseFloat(a)+parseFloat(b)+parseFloat(c);
				var v=$(this).parent().parent().find(".fpmoney").html();
				var sum = 0;
				if(d==''||isNaN(d) ){
					sum = parseFloat(v);
				}else{
					$("#outtimefee").val(a);
					$("#outkmsfee").val(b);
					$("#dirverfee").val(c);
					sum = parseFloat(v)+parseFloat(d);
				}
				allmoney+=sum;
			}
		});
		$(".labelmoney").html(allmoney);
		$("#money").val(allmoney);
	}
	function check() {
		if($("#money").val()==''||$("#money").val==null){
			alert("请至少选择一个订单");
			return false;
		}else{
			$('#inputForm').submit();
		}
	}
</script>
</head>
<body>
	<div class="container font_normal_size"> 
		<c:set var="siderMenuName" value="关于发票"/>
		<%@ include file="/WEB-INF/views/modules/base/siderMenu.jsp"%>
		<div class="container_con">
			  <div id="tab3" class="tab_content"style="float: right;" >
<div class="inroice">
    <dl>
        <dd style="padding-top: 10px">
            <span class="draw">可开发票列表</span>
            <span class="record"><a href="${ctxFront }/usersRcpt/history">开票记录</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <a href="${ctxFront }/usersRcpt/userInfo">开票信息</a>
            </span>
        </dd>
        <dd style="padding-top: 20px">
            <span class="selecter">已选金额:&nbsp;&nbsp;</span>&nbsp;&nbsp;&nbsp;<span class="money_1 labelmoney">0.00</span>
            <a href="javascript:check();" class="query" id="kp">立刻开票</a>
        </dd>
    </dl>
</div>
             <div class="check_all fp_list">
             <form id="inputForm" action="${ctxFront }/usersRcpt/userInfo" method="post">
             <input type="hidden" name="totalOuttimefee" id="outtimefee">
             <input type="hidden" name="totalOutkmsfee" id="outkmsfee">
             <input type="hidden" name="totalRirverfee" id="dirverfee">
             <input type="hidden" name="money" id="money">
             <input type="hidden" name="buttonname" value="提交">
                 <table class="check_all_1">

                     <tr class="back-color">
                         <td style="padding-left: 35px">
                         </td>
                             <td>订单号</td>
                             <td>订单名称</td>
                             <td>可开票金额</td>
                             <td>支付时间</td>
                             <td>超时长费</td>
                             <td>超公里费</td>
                             <td>司机食宿费</td>
                     </tr>
					<c:forEach items="${ordersList}" var="orders">
				    		<tr class="bgwhile">
				    			<td>
				    			<input type="radio" class="selectChild" value="${orders.orderid }" name="rcptIds" onclick="JSfpmoney()">
				    			</td>
				    			<td>${orders.orderid }</td>
				    			<td>${orders.ordername }</td>
				    			<td class="fpmoney">${orders.dueamount}</td>
				    			<td class="fp"><fmt:formatDate value="${orders.paydate }" pattern="yyyy-MM-dd"/></td>
				    			<td class="fp">
				    			<input type="number" placeholder="请填写" class="overtime_1 xs1" min="0" name="outtimefee"></td>
				    			<td class="fp">
				    			<input type="number" placeholder="请填写" class="overtime_1 xs2" min="0" name="outkmsfee"></td>
				    			<td class="fp">
				    			<input type="number" placeholder="请填写" class="overtime_1 xs3" min="0" name="dirverfee"></td>
				    		</tr>
                     <tr class="my-bor">
                         <td colspan="8"></td>
                     </tr>
			    		</c:forEach>
                 </table>
			</form>

</div>
		${page.html}

<div class="rule">
    <h5 class="rule_0">开票规则:</h5>
    <h6>1.开票内容仅支持代办租车费，发票类型仅支持增值税普通发票。</h6>
    <h6>2.支持线下收费开票，司机食宿、超公里费、超时费均可开票。</h6>
    <h6>3.单次申请开票满1000元包邮，不满1000元邮费到付，暂不支持港澳台包邮。</h6>
    <h6>4.开具发票需提供：发票抬头、纳税人识别号（企业必填）、收件人及电话、邮寄地址、邮编。</h6>
    <h6>5.增值税普通发票我们将在3-7个工作日寄出。</h6>
    <h6>6.因个人原因导致发票退回重开，所产生的往返快递费用将由您自行承担</h6>


</div></div></div></div>
</body>
</html>
<jsp:include page="/WEB-INF/views/layouts/foot.jsp"></jsp:include> 